import request from "@/utils/request.js";

const api_prefix = "/order/info";

export function saveOrder(data,orderId,userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/save/${orderId}/${userId}`,
    method: "POST",
    data: data,
  });
}

export function getYearData(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/year/spend/${userId}`,
    method: "GET"
  });
}

export function findWeekdayData(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/week/spend/${userId}`,
    method: "GET",
  });
}

export function getYearTotalData(userId) {
  return request({
    //模板字符串拼接参数
    url: `${api_prefix}/year/spend/total/${userId}`,
    method: "GET",
  });
}